<?php
/**
 * 表模型 vod_url 
 * @copyright reginx.com
 * @Created By Reginx tab tool
 */
class vod_url_tab extends tab {

    /**
     * 添加影视播放地址
     *
     * @param unknown_type $vid
     * @param unknown_type $url
     */
    public function add($vid , $url){
        $list = array();
        if($url != ''){
            $url = explode("\n" , $url);
            foreach ($url as $v){
                $tmp = explode('#' , $v);
                if(count($tmp) == 4){
                    $id = intval($tmp[0]);
                    $this->set("id" , $id);
                    $this->set("vid" , $vid);
                    $this->set("player" , intval($tmp[1]));
                    $this->set("name" , filter::text($tmp[2]));
                    $this->set("url"  , filter::text($tmp[3]));
                    $this->replace();
                }
            }
        }
    }

}
?>